from utils.req_util import req, Method


def get_token(base_url, account, password):
    data = {
        'account': account,
        'password': password
    }
    response = req(Method.POST, base_url + '/tokens', body=data)
    return response['token']
